package com.kingdee.eas.ec.garden.settle.client;

import com.kingdee.bos.*;
import com.kingdee.bos.bot.engine.common.BOTPFormulaEngineTools;
import com.kingdee.bos.dao.*;
import com.kingdee.bos.dao.ormapping.*;
import com.kingdee.bos.framework.ejb.EJBFactory;
import com.kingdee.bos.metadata.*;
import com.kingdee.bos.metadata.bot.*;
import com.kingdee.bos.metadata.bot.app.BOTMappingHelper;
import com.kingdee.bos.metadata.bot.app.BOTRuleFilterTools;
import com.kingdee.bos.metadata.bot.runtime.BotUtil;
import com.kingdee.bos.metadata.entity.*;
import com.kingdee.bos.metadata.query.*;
import com.kingdee.bos.metadata.query.util.CompareType;
import com.kingdee.bos.sql.ParserException;
import com.kingdee.bos.util.BOSObjectType;
import com.kingdee.bos.util.BOSUuid;
import com.kingdee.eas.base.attachment.common.AttachmentManagerFactory;
import com.kingdee.eas.base.attachment.common.AttachmentServerManager;
import com.kingdee.eas.base.bot.trace.*;
import com.kingdee.eas.base.bot.trace.core.ITraceManager;
import com.kingdee.eas.base.bot.trace.util.TraceConfigurator;
import com.kingdee.eas.base.botp.*;
import com.kingdee.eas.base.botp.util.*;
import com.kingdee.eas.base.btp.BTPException;
import com.kingdee.eas.base.btp.BTPTransformResult;
import com.kingdee.eas.base.btp.app.AbstractBTPManagerControllerBean;
import com.kingdee.eas.base.btp.app.BTPAppUtils;
import com.kingdee.eas.base.btp.app.BTPDAO;
import com.kingdee.eas.common.EASBizException;
import com.kingdee.eas.framework.*;
import com.kingdee.eas.framework.app.CoreBillBaseController;
import com.kingdee.eas.util.StringUtil;
import com.kingdee.util.*;
import com.kingdee.util.db.SQLUtils;
import java.lang.reflect.Method;
import java.math.BigDecimal;
import java.sql.SQLException;
import java.util.*;

import org.apache.log4j.Logger;
import org.dom4j.DocumentException;

public class BTPManagerControllerBean extends AbstractBTPManagerControllerBean {
	public BTPManagerControllerBean() {

		/* 112*/trace = TraceManagerFactory
				.newInstance(TraceConstants.TRACETYPE_BOTP);
		/* 113*/botTransformSqle = null;
	}

	protected String _getTableColumnFieldNameByPropName(Context ctx,
			String bosTypeString, String propName) throws BOSException,
			BTPException {

		/* 513*/IMetaDataLoader loader = MetaDataLoaderFactory
				.getLocalMetaDataLoader(ctx);

		/* 515*/EntityObjectInfo tempObj = loader.getEntity(BOSObjectType
				.create(bosTypeString));

		/* 518*/String defaultF7Query = tempObj
				.getExtendedProperty("defaultF7Query");
		/* 519*/if (!defaultF7Query.startsWith("com.kingdee.eas"))

			/* 521*/throw new BTPException(
					BTPException.QUERYFIELDTOTABLECOLUMNNAMEERROR);

		/* 524*/QueryInfo queryInfo = loader.getQuery(new MetaDataPK(tempObj
				.getExtendedProperty("defaultF7Query")));

		/* 526*/String props[] = StringUtils.split(propName, ".");

		/* 528*/QueryFieldCollection fields = queryInfo.getUnits()
				.getQueryFields();
		/* 529*/for (int i = 0; i < fields.size(); i++) {/* 530*/
			QueryFieldInfo field = fields.get(i);
			/* 531*/if (field.getPropertyRefs().get(0).getSubEntity()
					.getName().equals(props[0])
					&& field.getPropertyRefs().get(0).getRefProperty()
							.getName().equals(props[1]))

				/* 534*/return field.getName().toString();
		}

		/* 539*/throw new BTPException(
				BTPException.QUERYFIELDTOTABLECOLUMNNAMEERROR);
	}

	public static String localInstance = "getLocalInstance";
	private static Logger logger;
	protected ITraceManager trace;
	private BOTTransformSQLE botTransformSqle;
	static {
		/* <-MISALIGNED-> *//* 111*/logger = Logger
				.getLogger(com.kingdee.eas.base.btp.app.BTPManagerControllerBean.class);
	}
	@Override
	protected void _delReverseWrite(Context context, IObjectValue iobjectvalue)
			throws BOSException, EASBizException {
		// TODO Auto-generated method stub
		
	}

	@Override
	protected void _execDataFilterTemp(Context context,
			IObjectCollection iobjectcollection, String s) throws BOSException {
		// TODO Auto-generated method stub
		
	}

	@Override
	protected String _getClassNameByBOSType(Context context, String s)
			throws BOSException, BTPException {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	protected Map _getDestEntries(Context context, String s, String s1,
			String[] as) throws BOSException {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	protected IObjectCollection _getDestRelation(Context context, String s)
			throws BOSException, BTPException {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	protected HashMap _getEntityObjectInfo4Trace(Context context, String s,
			String s1, Hashtable hashtable) throws BOSException, BTPException {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	protected String _getEntityObjectInfoDisplayName(Context context, String s)
			throws BOSException, BTPException {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	protected String _getEntityObjectInfoExtendPro(Context context, String s,
			String s1) throws BOSException, BTPException {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	protected String _getEntityObjectInfoPro(Context context, String s,
			String s1) throws BOSException, BTPException {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	protected String _getGroupingProperties(Context context,
			IObjectValue iobjectvalue, String s) throws BOSException,
			BTPException {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	protected String _getPropNameByTableFieldName(Context context, String s,
			String s1) throws BOSException, BTPException {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	protected IObjectValue _getQueryInfo(Context context, String s)
			throws BOSException {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	protected IObjectCollection _getRelationCollection(Context context, String s)
			throws BOSException, BTPException {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	protected IObjectValue _getValueNoSave(Context context,
			IObjectValue iobjectvalue) throws BOSException {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	protected boolean _ifHaveDestBills(Context context, String s)
			throws BOSException {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	protected EntityViewInfo _initIdFilterForTrace(Context context,
			Vector vector) throws BOSException, BTPException {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	protected BTPTransformResult _innerTransform(Context context, List list,
			String s, List list1) throws BOSException, BTPException {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	protected boolean _isPropOwner(Context context, String s, String s1)
			throws BOSException, BTPException {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	protected void _multilLevelReveserWrite(Context context,
			IObjectValue iobjectvalue, IObjectValue iobjectvalue1,
			IObjectValue iobjectvalue2) throws BOSException, BTPException,
			EASBizException {
		// TODO Auto-generated method stub
		
	}

	@Override
	protected void _removeAllRelation(Context context, IObjectValue iobjectvalue)
			throws BOSException, BTPException {
		// TODO Auto-generated method stub
		
	}

	@Override
	protected void _removeAllRelation(Context context,
			IObjectCollection iobjectcollection) throws BOSException,
			BTPException {
		// TODO Auto-generated method stub
		
	}

	@Override
	protected void _removeAllRelationBetween(Context context,
			IObjectValue iobjectvalue, IObjectValue iobjectvalue1)
			throws BOSException, BTPException {
		// TODO Auto-generated method stub
		
	}

	@Override
	protected void _removeAllSRCRelation(Context context,
			IObjectValue iobjectvalue) throws BOSException, BTPException {
		// TODO Auto-generated method stub
		
	}

	@Override
	protected void _reverseWrite(Context context, IObjectValue iobjectvalue)
			throws BOSException, EASBizException {
		// TODO Auto-generated method stub
		
	}

	@Override
	protected void _reverseWrite(Context context, IObjectValue iobjectvalue,
			BOTBillOperStateEnum botbilloperstateenum) throws BOSException,
			EASBizException {
		// TODO Auto-generated method stub
		
	}

	@Override
	protected void _reverseWrite(Context context, IObjectValue iobjectvalue,
			IObjectCollection iobjectcollection,
			IObjectCollection iobjectcollection1) throws BOSException,
			EASBizException {
		// TODO Auto-generated method stub
		
	}

	@Override
	protected void _reverseWriteBill(Context context, IObjectValue iobjectvalue)
			throws BOSException, EASBizException {
		// TODO Auto-generated method stub
		
	}

	@Override
	protected void _reverseWriteByDestBill(Context context,
			IObjectValue iobjectvalue, BOTBillOperStateEnum botbilloperstateenum)
			throws BOSException, EASBizException {
		// TODO Auto-generated method stub
		
	}

	@Override
	protected IObjectPK _saveRelations(Context context,
			IObjectValue iobjectvalue, IObjectCollection iobjectcollection)
			throws BOSException, EASBizException {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	protected void _saveTemp(Context context,
			IObjectCollection iobjectcollection) throws BOSException {
		// TODO Auto-generated method stub
		
	}

	@Override
	protected void _submitRelations(Context context,
			IObjectCollection iobjectcollection) throws BOSException {
		// TODO Auto-generated method stub
		
	}

	@Override
	protected IObjectPK _submitRelations(Context context,
			IObjectValue iobjectvalue, IObjectCollection iobjectcollection)
			throws BOSException, EASBizException {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	protected void _takeAttachmentOnRelations(Context context,
			IObjectCollection iobjectcollection) throws BOSException,
			EASBizException {
		// TODO Auto-generated method stub
		
	}

	@Override
	protected BTPTransformResult _transform(Context context,
			IObjectCollection iobjectcollection, String s) throws BOSException,
			BTPException {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	protected BTPTransformResult _transform(Context context,
			IObjectValue iobjectvalue, String s) throws BOSException,
			BTPException {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	protected BTPTransformResult _transform(Context context,
			IObjectValue iobjectvalue, IObjectValue iobjectvalue1)
			throws BOSException, BTPException {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	protected BTPTransformResult _transform(Context context,
			IObjectCollection iobjectcollection, IObjectValue iobjectvalue)
			throws BOSException, BTPException {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	protected BTPTransformResult _transform(Context context, String[] as,
			String s) throws BOSException, BTPException {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	protected BTPTransformResult _transform(Context context, String[] as,
			IObjectValue iobjectvalue) throws BOSException, BTPException {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	protected BTPTransformResult _transform(Context context,
			IObjectCollection iobjectcollection, String s, IObjectPK iobjectpk)
			throws BOSException, BTPException {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	protected BTPTransformResult _transform(Context context, String[] as,
			String s, IObjectPK iobjectpk) throws BOSException, BTPException {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	protected IObjectValue _transformAuto(Context context,
			IObjectValue iobjectvalue, String s) throws BOSException,
			BTPException, EASBizException {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	protected IObjectValue _transformAuto(Context context,
			IObjectCollection iobjectcollection, String s) throws BOSException,
			BTPException, EASBizException {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	protected IObjectValue _transformAuto(Context context, String[] as, String s)
			throws BOSException, BTPException, EASBizException {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	protected BTPTransformResult _transformForBTP(Context context,
			IObjectCollection iobjectcollection, String s, IObjectPK iobjectpk,
			IObjectPK iobjectpk1) throws BOSException, BTPException {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	protected BTPTransformResult _transformForBotp(Context context, List list,
			String s, List list1) throws BOSException, BTPException {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	protected BTPTransformResult _transformForBotp(Context context,
			IObjectCollection iobjectcollection, String s, IObjectPK iobjectpk)
			throws BOSException, BTPException {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	protected BTPTransformResult _transformForBotp(Context context,
			String[] as, String s, List list) throws BOSException, BTPException {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	protected BTPTransformResult _transformForBotp(Context context,
			String[] as, String[] as1, List list,
			SelectorItemCollection selectoritemcollection, String s,
			IObjectPK iobjectpk, String s1) throws BOSException, BTPException {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	protected BTPTransformResult _transformForBotpAppend(Context context,
			String[] as, String[] as1, List list,
			SelectorItemCollection selectoritemcollection, String s,
			IObjectPK iobjectpk, String s1, String s2) throws BOSException,
			BTPException {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	protected BTPTransformResult _transformForBotpRepull(Context context,
			String[] as, String[] as1, List list,
			SelectorItemCollection selectoritemcollection, String s,
			IObjectPK iobjectpk, String s1, String s2) throws BOSException,
			BTPException {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	protected BTPTransformResult _transformFromMultiBillType(Context context,
			List list, String s) throws BOSException, BTPException,
			BOTPException {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	protected BTPTransformResult _transformMultiBill(Context context,
			IObjectCollection iobjectcollection, String s) throws BOSException,
			BTPException {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	protected BTPTransformResult _transformMultiBill(Context context,
			String[] as, String s) throws BOSException, BTPException {
		// TODO Auto-generated method stub
		return null;
	}
}
